<template>
  <div>
    <div class="back" @click="backClick">返回</div>
    <div class="xiangq">
      <img v-lazy="obj.small_image" alt="" />
      <div>{{ obj.name }}</div>
      <div>{{ obj.spec }}</div>
      <div>￥{{ obj.price }}</div>
    </div>

    <div class="goumai">
      <!-- <van-goods-action> -->
        <van-goods-action-icon icon="chat-o" text="客服" dot />
        <van-goods-action-icon icon="cart-o" text="购物车" badge="5" />
        <van-goods-action-button type="warning" text="加入购物车" />
        <van-goods-action-button type="danger" text="立即购买" />
      <!-- </van-goods-action> -->
    </div>
  </div>
</template>

<script>
export default {
  name: "XiangQing",
  data() {
    return {
      obj: {},
    };
  },
  created() {
    this.obj = this.$store.state.obj;
    console.log(this.obj);
  },
  methods:{
    backClick(){
        // console.log(1);
        this.$router.back()
    }
  }
};
</script>

<style scoped lang="scss">
.xiangq {
  width: 80%;
  margin: 0 auto;
  img {
    width: 100%;
    height: 4rem;
  }
}
.goumai{
    width: 100%;
    display: flex;
    position: fixed;
    bottom: .4rem;
    align-items: center;
    height: 2rem;
}
</style>